<style>
<!--
.account-bind {
	width:90%;
	height:200px;
	float:left;
	padding:5px;
	margin:10px;
	margin-top:50px;
	background:#EEEEEE;
	-moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    -moz-box-shadow:1px 1px 1px #333333;
   -webkit-box-shadow:1px 1px 1px #333333;
    box-shadow:1px 1px 1px #333333
}

.authlink{
position:absolute;
width:32px;
height:32px;

}
-->
</style>
<script>
$(function(){
  var inilink=30;
  $(".authlink").each(function(i){

  alert(i*32+inilink+'px');
  $(this).attr('left',i*32+inilink+'px');
  
  });

	$(".authlink").click(function(){
		var iIframe =  $("#oauthUI").attr("src",$(".authlink").attr('ref'));		

		$('<div/>').css({width:'100%',height:'100%',overflow:'hidden'}).append(iIframe)
		.dialog({width:650,height:450,modal:true});
	});
});
</script>
<fieldset>
<!--legend>请选择要编辑的微博</legend-->

<div class="account-bind">

  <div class='icon'>
	<?php foreach($bindInfo['binds'] as $binds):?>
	<div class='authlink' >
	 <?php echo CHtml::image(Yii::app()->baseUrl."/images/icon/{$binds->pid}_32x32.png")?>
	</div>
	 <div class='authlink' >
   <?php echo CHtml::image(Yii::app()->baseUrl."/images/icon/{$binds->pid}_32x32.png")?>
  </div>
	<?php endforeach;?>
	

  <?php foreach($bindInfo['unbinds'] as $unbind):?>
  <div class='authlink' ref="<?php echo WeiboApiFactory::authorizeURL($unbind,'/weibo/backBindPid');?>">
    <?php echo CHtml::image(Yii::app()->baseUrl."/images/icon/{$unbind}_32x32.png")?>
  </div>
  <div class='authlink' ref="<?php echo WeiboApiFactory::authorizeURL($unbind,'/weibo/backBindPid');?>">
    <?php echo CHtml::image(Yii::app()->baseUrl."/images/icon/{$unbind}_32x32.png")?>
  </div>
  <?php endforeach;?>
  </div>
  
</div>
</fieldset>

<iframe width='100%' height='100%' border = '0' id='oauthUI'pid=''>
</iframe>